3.2522 \(\int \frac {a+b x^n}{x} \, dx\)

Optimal. Leaf size=13 \[ a \log (x)+\frac {b x^n}{n} \]

[Out]

b*x^n/n+a*ln(x)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \[ a \log (x)+\frac {b x^n}{n} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)/x,x]

[Out]

(b*x^n)/n + a*Log[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin {align*} \int \frac {a+b x^n}{x} \, dx &=\int \left (\frac {a}{x}+b x^{-1+n}\right ) \, dx\\ &=\frac {b x^n}{n}+a \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 13, normalized size = 1.00 \[ a \log (x)+\frac {b x^n}{n} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)/x,x]

[Out]

(b*x^n)/n + a*Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 15, normalized size = 1.15 \[ \frac {a n \log \relax (x) + b x^{n}}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="fricas")

[Out]

(a*n*log(x) + b*x^n)/n

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {b x^{n} + a}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="giac")

[Out]

integrate((b*x^n + a)/x, x)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 19, normalized size = 1.46 \[ \frac {a \ln \left (x^{n}\right )}{n}+\frac {b \,x^{n}}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^n+a)/x,x)

[Out]

a/n*ln(x^n)+b/n*x^n

________________________________________________________________________________________

maxima [A]  time = 0.50, size = 18, normalized size = 1.38 \[ \frac {b x^{n}}{n} + \frac {a \log \left (x^{n}\right )}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="maxima")

[Out]

b*x^n/n + a*log(x^n)/n

________________________________________________________________________________________

mupad [B]  time = 0.00, size = 13, normalized size = 1.00 \[ a\,\ln \relax (x)+\frac {b\,x^n}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)/x,x)

[Out]

a*log(x) + (b*x^n)/n

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 17, normalized size = 1.31 \[ \begin {cases} a \log {\relax (x )} + \frac {b x^{n}}{n} & \text {for}\: n \neq 0 \\\left (a + b\right ) \log {\relax (x )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)/x,x)

[Out]

Piecewise((a*log(x) + b*x**n/n, Ne(n, 0)), ((a + b)*log(x), True))

________________________________________________________________________________________